Produced by Araxis Merge on 2023-07-12 04:42:38 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Porto v4.0.5/Theme Files/Porto Theme/app/code/Smartwave/Dailydeals/Controller/Adminhtml/Dailydeal | Delete.php | 2018-03-14 03:42:44 +0000 |
| 2 | Porto v4.0.6/Theme Files/Porto Theme/app/code/Smartwave/Dailydeals/Controller/Adminhtml/Dailydeal | Delete.php | 2018-03-14 03:42:44 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 1 | 96 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | <?php | 1 | <?php | |||
| 2 | namespace Smartwave\Dailydeals\Controller\Adminhtml\Dailydeal; | 2 | namespace Smartwave\Dailydeals\Controller\Adminhtml\Dailydeal; | |||
| 3 | 3 | |||||
| 4 | class Delete extends \Smartwave\Dailydeals\Controller\Adminhtml\Dailydeal | 4 | class Delete extends \Smartwave\Dailydeals\Controller\Adminhtml\Dailydeal | |||
| 5 | { | 5 | { | |||
| 6 | /** | 6 | /** | |||
| 7 | * execute action | 7 | * execute action | |||
| 8 | * | 8 | * | |||
| 9 | * @return \Magento\Backend\Model\View\Result\Redirect | 9 | * @return \Magento\Backend\Model\View\Result\Redirect | |||
| 10 | */ | 10 | */ | |||
| 11 | public function execute() | 11 | public function execute() | |||
| 12 | { | 12 | { | |||
| 13 | $resultRedirect = $this->resultRedirectFactory->create(); | 13 | $resultRedirect = $this->resultRedirectFactory->create(); | |||
| 14 | $id = $this->getRequest()->getParam('dailydeal_id'); | 14 | $id = $this->getRequest()->getParam('dailydeal_id'); | |||
| 15 | if ($id) { | 15 | if ($id) { | |||
| 16 | $sw_product_sku = ""; | 16 | $sw_product_sku = ""; | |||
| 17 | try { | 17 | try { | |||
| 18 | /** @var \Smartwave\Dailydeals\Model\Dailydeal $dailydeal */ | 18 | /** @var \Smartwave\Dailydeals\Model\Dailydeal $dailydeal */ | |||
| 19 | $dailydeal = $this->dailydealFactory->create(); | 19 | $dailydeal = $this->dailydealFactory->create(); | |||
| 20 | $dailydeal->load($id); | 20 | $dailydeal->load($id); | |||
| 21 | $sw_product_sku = $dailydeal->getSw_product_sku(); | 21 | $sw_product_sku = $dailydeal->getSw_product_sku(); | |||
| 22 | $dailydeal->delete(); | 22 | $dailydeal->delete(); | |||
| 23 | $this->messageManager->addSuccess(__('The Dailydeal has been deleted.')); | 23 | $this->messageManager->addSuccess(__('The Dailydeal has been deleted.')); | |||
| 24 | $this->_eventManager->dispatch( | 24 | $this->_eventManager->dispatch( | |||
| 25 | 'adminhtml_sw_dailydeals_dailydeal_on_delete', | 25 | 'adminhtml_sw_dailydeals_dailydeal_on_delete', | |||
| 26 | ['sw_product_sku' => $sw_product_sku, 'status' => 'success'] | 26 | ['sw_product_sku' => $sw_product_sku, 'status' => 'success'] | |||
| 27 | ); | 27 | ); | |||
| 28 | $resultRedirect->setPath('sw_dailydeals/*/'); | 28 | $resultRedirect->setPath('sw_dailydeals/*/'); | |||
| 29 | return $resultRedirect; | 29 | return $resultRedirect; | |||
| 30 | } catch (\Exception $e) { | 30 | } catch (\Exception $e) { | |||
| 31 | $this->_eventManager->dispatch( | 31 | $this->_eventManager->dispatch( | |||
| 32 | 'adminhtml_sw_dailydeals_dailydeal_on_delete', | 32 | 'adminhtml_sw_dailydeals_dailydeal_on_delete', | |||
| 33 | ['sw_product_sku' => $sw_product_sku, 'status' => 'fail'] | 33 | ['sw_product_sku' => $sw_product_sku, 'status' => 'fail'] | |||
| 34 | ); | 34 | ); | |||
| 35 | // display error message | 35 | // display error message | |||
| 36 | $this->messageManager->addError($e->getMessage()); | 36 | $this->messageManager->addError($e->getMessage()); | |||
| 37 | // go back to edit form | 37 | // go back to edit form | |||
| 38 | $resultRedirect->setPath('sw_dailydeals/*/edit', ['dailydeal_id' => $id]); | 38 | $resultRedirect->setPath('sw_dailydeals/*/edit', ['dailydeal_id' => $id]); | |||
| 39 | return $resultRedirect; | 39 | return $resultRedirect; | |||
| 40 | } | 40 | } | |||
| 41 | } | 41 | } | |||
| 42 | // display error message | 42 | // display error message | |||
| 43 | $this->messageManager->addError(__('Dailydeal to delete was not found.')); | 43 | $this->messageManager->addError(__('Dailydeal to delete was not found.')); | |||
| 44 | // go to grid | 44 | // go to grid | |||
| 45 | $resultRedirect->setPath('sw_dailydeals/*/'); | 45 | $resultRedirect->setPath('sw_dailydeals/*/'); | |||
| 46 | return $resultRedirect; | 46 | return $resultRedirect; | |||
| 47 | } | 47 | } | |||
| 48 | } | 48 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.